/*
 * @Description: xxx描述文件内容
 * @Autor: gufuyan
 * @Date: 2021-11-12 09:08:06
 * @lastModifiedBy: gufuyan
 * @LastEditTime: 2021-11-26 19:44:55
 * @lastModifiedContent: xxx描述修改的内容
 */
/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: { currentUser?: API.CurrentUser | undefined }) {
  const { currentUser } = initialState || {};
  const userinfo = {
    zhName: '古福艳',
    userId: 9346,
    sex: 'F',
    userImage:
      'https://shp.qpic.cn/bizmp/v40FKSmkDDLV3Lhbx1vbcDJYr5Jiadu6JpLj4xmicYGQAt76cM0H6Hzw/',
    orgName: '40系统建设部',
    isPunch: 'Y',
    isTs: 'ZB',
    empAttribute: 'P',
    costCenter: 'GZM2120433',
    socialBase: '顺德',
    socialBasePy: 'shunde',
    contractBase: '广州',
    contractBasePy: 'guangzhou',
    telephone: '15112450580',
    baseName: '顺德',
    permissionList: [
      'attendance.afterLeave.saveAfterLeaveConf.create',
      'attendance.afterLeave.findUserCanAfterLeave.search',
    ],
  };
  return {
    canAdmin: currentUser && currentUser.access === 'admin',

  };
}
